package com.yxt.qmgf.home.sql;

import com.yxt.qmgf.home.GGVO;
import com.yxt.qmgf.start.vo.LoginVO;
import com.yxt.qmgf.userinfo.vo.UserInfoVO;
import org.apache.ibatis.annotations.Param;

public class ggSQLProvider {

    public String Insert(@Param("vo") GGVO vo) {
        return "INSERT INTO gonggao (title, content, create_time, creator) " +
                "VALUES (#{vo.title}, #{vo.content}, #{vo.create_time}, #{vo.creator})";
    }

    public String del(@Param("id") int id){
        return "DELETE FROM gonggao WHERE id = #{id}";
    }

    public String Update(@Param("vo") GGVO vo)
    { return "UPDATE gonggao SET title = #{vo.title}, content = #{vo.content}, create_time = #{vo.create_time}, creator = #{vo.creator} WHERE id = #{vo.id}";}

    public String Select() {
        return "SELECT * FROM gonggao";
    }

    public String SelectT(@Param("title") String title) {
        return "SELECT * FROM gonggao where title like #{title}";
    }
}
